home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / viewkit / xcontact / include / SrchDialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.3 KB  |  75 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /////////////////////////////////////////////////////////////////////////
  18. // SrchDialog.h --
  19. /////////////////////////////////////////////////////////////////////////
  20. #ifndef SRCHDIALOG_H
  21. #define SRCHDIALOG_H
  22.  
  23. #include "OkStr.h"
  24. #include "OkText.h"
  25. #include "OkLabeledComponent.h"
  26. #include "OkToggleButton.h"
  27.  
  28. #include <Vk/VkGenericDialog.h>
  29.  
  30. class VkSimpleWindow;
  31.  
  32. class SrchDialog : public VkGenericDialog {
  33.  
  34.  private:
  35.   OkLabeledComponent<OkText>*    _srchString;
  36.   OkToggleButton*        _caseSensitive;
  37.   OkToggleButton*        _srchNotes;
  38.  
  39.   void ok( Widget, XtPointer ) { srchForward(); }
  40.   void apply( Widget, XtPointer ) { srchBackward(); }
  41.   void cancel( Widget, XtPointer ) { unpost(); }
  42.  
  43.   void srchForward();
  44.   void srchBackward();
  45.  
  46.   VkSimpleWindow*     _currentParentWindow;
  47.   Boolean         _allowInterruption;
  48.  
  49.  public:
  50.   SrchDialog();
  51.   ~SrchDialog() {}
  52.   Widget createDialog( Widget );
  53.  
  54.   const char* srchString() const    { return _srchString->t()->getValue(); }
  55.   Boolean caseSensitive() const     { return _caseSensitive->getValue(); }
  56.   Boolean srchNotes() const         { return _srchNotes->getValue(); }
  57.  
  58.   Boolean allowInterruption() const     { return _allowInterruption; }
  59.  
  60.   Widget prepost ( const char      *message,
  61.                              XtCallbackProc   okCB       = NULL,
  62.                              XtCallbackProc   cancelCB   = NULL,
  63.                              XtCallbackProc   applyCB    = NULL,
  64.                              XtPointer        clientData = NULL,
  65.                              const char      *helpString = NULL,
  66.  
  67.                              VkSimpleWindow  *parent     = NULL);
  68.  
  69.  
  70. };
  71.  
  72. extern SrchDialog* theSrchDialog;
  73.  
  74. #endif
  75.